#!/bin/sh
#如果是要杀掉php-fpm的进程，下面的语句中php-cgi请改成php-fpm
# pids=`ps -ef|grep php-cgi|grep -v "grep"|grep -v "$0"| awk '{print $2}'`
pids=`ps -ef|grep php-fpm|grep -v "grep"|grep -v "$0"| awk '{print $2}'`
if [ "$pids" != "" ];then
    for  pid  in   $pids;
    do
        kill -9 $pid
        # echo $pid
        # echo "\n"
    done
fi